home *** CD-ROM | disk | FTP | other *** search
- /*
- File: MoreOSUtils.h
-
- Contains: Interface to the OS utilities library.
-
- Written by: Quinn
-
- Copyright: Copyright © 1999 by Apple Computer, Inc., all rights reserved.
-
- You may incorporate this Apple sample source code into your program(s) without
- restriction. This Apple sample source code has been provided "AS IS" and the
- responsibility for its operation is yours. You are not permitted to redistribute
- this Apple sample source code as "Apple sample source code" after having made
- changes. If you're going to re-distribute the source, we require that you make
- it clear in the source that the code was descended from Apple sample source
- code, but that you've made changes.
-
- Change History (most recent first):
-
- <2> 16/3/99 Quinn Rolled in InterfaceDisableLib from DTS Technote 1137.
- <1> 1/3/99 Quinn First checked in.
- */
-
- #pragma once
-
- /////////////////////////////////////////////////////////////////
-
- // MoreIsBetter Setup
-
- #include "MoreSetup.h"
-
- // Standard Mac OS interfaces
-
- #include <MacTypes.h>
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /////////////////////////////////////////////////////////////////
- // Instruction Cache Flushing
-
- extern pascal OSStatus MakeDataPowerPCExecutable(void *address, ByteCount count);
- // Make the memory range described by address and count
- // executable as PowerPC code. This routine can only return
- // an error when called from classic 68K code.
-
- extern pascal OSStatus MakeData68KExecutable(void *address, ByteCount count);
- // Make the memory range described by address and count
- // executable as 68K code. This routine can never return an
- // error. It has an error result purely for symmetry with
- // MakeDataPowerPCExecutable.
-
- #if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
-
- // IMPORTANT:
- // This routine is only necessary if you're compiling
- // classic 68K which calls MakeDataPowerPCExecutable.
-
- extern pascal void TermMoreOSUtils(void);
- // A termination routine for this library. Call it before
- // you unload from memory.
-
- #endif
-
- /////////////////////////////////////////////////////////////////
- // Interrupt Enable and Disable
-
- // See DTS Technote 1xxx "Disabling Interrupts on the Traditional Mac OS"
- // for details on how this works, why you should avoid it, and what
- // alternatives there are.
-
- extern pascal UInt16 GetInterruptMask(void);
- // Returns the current interrupt mask, as a value
- // from 0 to 7.
-
- extern pascal UInt16 SetInterruptMask(UInt16 newMask);
- // Sets the current interrupt mask, as a value
- // from 0 to 7.
-
- #ifdef __cplusplus
- }
- #endif
-